# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=nbtscan
pkgver=36.8ab6a70
pkgrel=1
pkgdesc='Scan networks for NetBIOS name information.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-scanner' 'blackarch-windows')
url='https://github.com/resurrecting-open-source-projects/nbtscan'
license=('GPL2')
depends=('glibc' 'autogen' 'gcc' 'make')
makedepends=('git')
source=("git+https://github.com/resurrecting-open-source-projects/$pkgname.git")
sha512sums=('SKIP')

prepare() {
  cd $pkgname

  ./autogen.sh
  ./configure --prefix=/usr
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" doc/* *.md
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" ChangeLog
}

